<%--
  User: aleksey
  Date: Sep 25, 2009
  Time: 8:22:23 PM
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<html>
<link rel="icon" href="favicon.ico" type="image/x-icon">
<f:view locale="#{localeManager.locale}">
    <f:loadBundle var="msgs" basename="messages"/>
    <head>
        <title><h:outputText value="#{msgs['title']}"/></title>
        <link href="olga.css" rel="stylesheet" type="text/css">
    </head>
    <body>
        <h:form id="problem_editor">
            <%@include file="logoPanel.jspf"%>
            <%@include file="navigationPanel.jspf"%>
            <h:outputText value="Name: "/>
            <h:inputText value="#{problem.editingProblem.name}"/>
            <br/>
            <h:outputText value="Input file name: "/>
            <h:inputText value="#{problem.editingProblem.inputFile}"/>
            <br/>
            <h:outputText value="Output file name: "/>
            <h:inputText value="#{problem.editingProblem.outputFile}"/>
            <br/>
            <h:outputText value="Time limit (in seconds): "/>
            <h:inputText value="#{problem.editingProblem.timeLimit}"/>
            <br/>
            <h:outputText value="Checker: "/>
            <h:selectOneMenu id="checker" value="#{problem.editingProblem.checker.id}">
                <f:selectItems value="#{problem.allCheckers}"/>
            </h:selectOneMenu>
            <br/>
            <h:outputText value="Statement: "/><br/>
            <h:inputTextarea value="#{problem.editingProblem.statement}" rows="8" cols="70"/>
            <br/>
            <h:outputText value="Input description: "/><br/>
            <h:inputTextarea value="#{problem.editingProblem.inputDescription}" rows="8" cols="70"/>
            <br/>
            <h:outputText value="Input example: "/><br/>
            <h:inputTextarea value="#{problem.editingProblem.inputExample}" rows="8" cols="70"/>
            <br/>
            <h:outputText value="Output description: "/><br/>
            <h:inputTextarea value="#{problem.editingProblem.outputDescription}" rows="8" cols="70"/>
            <br/>
            <h:outputText value="Output example: "/><br/>
            <h:inputTextarea value="#{problem.editingProblem.outputExample}" rows="8" cols="70"/>
            <br/>
            <h:commandButton value="Save" action="#{problem.saveProblem}"/>
            <br/><br/>
        </h:form>
    </body>
</f:view>
</html>
